package org.lk.common.factory;

import org.lk.entity.DataSourceEntity;
import org.springframework.beans.BeanUtils;

/**
 * @author: lk
 * @since:
 */
public class DsCreateFactory {

    public static StreamReader get(DataSourceEntity dataSourceEntity) {
        Class aClass = DsTypeStrategy.getZClass(dataSourceEntity.getDsType());
        return (StreamReader) BeanUtils.instantiateClass(aClass.getConstructors()[0], dataSourceEntity);


    }
}
